// Created by lifei on 2020/7/20--9:24.

<template>
  <basic-container>
    <data-list
      :pageInfo="pager"
      placeholder="请输入单位名称"
      :listData="tableData"
      searchName="keyword"
      :menuList="['add',{export:'导出'}]"
      @menu-click="handleMenuClick"
      :filterList="filterList"
    >
      <el-table :data="tableData" align="center">
        <el-table-column label="单位名称" prop="unitName" />
        <el-table-column label="单位类型" :formatter="dictVal_unitType" prop="unitType" />
        <el-table-column label="最新申请时间" prop="latestApplicationTime" />
        <el-table-column label="联系人名称" prop="userName" />
        <el-table-column label="联系电话" prop="tell" />
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button type="text" @click="toWindowEditData(scope)" v-if="update_but">编辑</el-button>
            <el-button type="text" @click="toWindowDetailData(scope)">查看</el-button>
            <el-button type="text" @click="toWindowApplyList(scope)">物业</el-button>
            <el-button type="text" @click="deleteRow(scope)" v-if="delete_but">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </data-list>
    <apply-unit-add ref="applyUnitAdd" />
    <apply-unit-edit ref="applyUnitEdit" @init="query" />
    <apply-unit-detail ref="applyUnitDetail" />
    <unit-apply-list ref="unitApplyList" />
  </basic-container>
</template>

<script src="./unit-list.js"></script>
<style scoped lang="scss">
@import "./unit-list";
</style>

